const Router = require('koa-router')
const jwt = require('jsonwebtoken')

const router = new Router()

router.post('/', (ctx, next) => {
  let token = jwt.sign({ username: 'lisi' }, 'xujiawei', { expiresIn: '1d' })
  ctx.set('Authorization', token)
  ctx.set('Access-Control-Expose-Headers', 'Authorization')
  ctx.body = { code: 200 }
})
module.exports = router
